<div class="wrapper-md" ng-controller="power">
    <toaster-container toaster-options="{'position-class': 'toast-top-center', 'close-button':true}"></toaster-container>
    <div ng-if="warehouseList" class="panel panel-default">
        <div class="panel-heading">
            {{title.title}}
            <!--<button style="float: right;margin-top: -5px;margin-left: 15px;" class="btn m-b-xs btn-sm btn-info btn-addon">-->
            <!--<i class="fa fa-trash-o"></i>删除-->
            <!--</button>-->
            <button ng-click="warehouseJump()"  style="float: right;margin-top: -5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>新建
            </button>
        </div>
        <div class="panel-body b-b b-light">
            搜索: <input id="filter" type="text" class="form-control input-sm w-sm inline m-r"/>
        </div>
        <div>
            <table class="table m-b-none" ui-jq="footable" data-filter="#filter" data-page-size="10">
                <thead>
                <tr>
                    <th data-toggle="true">{{columns[0].title}}</th>
                    <th>{{columns[3].title}}</th>
                    <th>{{columns[1].title}}</th>
                    <th>{{columns[2].title}}</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="tb in saveDate">
                    <td>{{tb.createTime}}</td>
                    <td><a href ng-click="showInfo(tb)"><u>{{tb.powerNumber}}</u></a></td>
                    <td>{{tb.powerUserName}}</td>
                    <td>{{tb.powerUserId}}</td>
                </tr>
                </tbody>
                <tfoot class="hide-if-no-paging">
                <tr>
                    <td colspan="5" class="text-center">
                        <ul class="pagination"></ul>
                    </td>
                </tr>
                </tfoot>
            </table>


        </div>
    </div>
    <div ng-if="warehouseAdd" class="panel panel-default">
        <div class="panel-heading">
            <u style="cursor:pointer"  ng-click="warehouseJump('back')">{{title.title}}</u> / {{title.addTitle}}
            <button ng-click="saveWarehouse('sm')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>保存
            </button>
            <button ng-click="warehouseJump('back')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body">
            <h3 style="text-align: center"><b>用户权限信息表</b></h3>
            <form class="form-horizontal" method="get">

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">制&nbsp;&nbsp;单&nbsp;&nbsp;人</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" id="zdr" value="{{row.zdr}}">
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-1">制单日期</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" ng-required="true" id="createTime" value="{{row.createTime}}"/>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-2">文件编码</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" id="powerNumber" value="{{row.powerNumber}}">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>

                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1"><span style="color:red">*</span>用户姓名</label>
                    <div class="col-sm-3">
                        <input readonly style="width:84%;float: left" type="text" class="form-control" id="powerUserName" value="{{row.powerUserName}}">
                        <span class="input-group-btn">
                            <button ng-click="showSelectUser('transferDhr')" class="btn btn-default" type="button"><i class="fa fa-plus"></i></button>
                        </span>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">用户ID</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" id="powerUserId" value="{{row.powerUserId}}">
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">价格可视</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerPrice" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>

                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>业务流程</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">销售订单</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerSaleOrder" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">销售出库</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerSaleWarehousing" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">销售退货</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerSaleReturn" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">采购订单</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerPurchasingOrder" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">采购入库</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerPurchasingWarehousing" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">采购退货</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerPurchasingReturn" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">其他出库</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerOthergoodOut" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">其他入库</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerOthergoodIn" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">货品调拨</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerTransfer" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">生产计划</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerProductionPlan" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">工艺加工</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerProcessProcess" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">货品盘点</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerInventory" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">商品组装</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerCommodityAssembly" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">商品拆卸</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerMerchandiseDisassembly" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>基础设置</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">结构清单</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerProductMix" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">流程管理</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerFlow" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-3">用户管理</label>
                    <div class="col-sm-3">
                        <label class="i-switch m-t-xs m-r">
                            <input ng-model="row.powerUser" type="checkbox" ng-true-value="true" ng-false-value="false">
                            <i></i>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div><div class="form-group">
                <label class="col-sm-1 control-label" for="input-id-1">机构管理</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerDept" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
                <label class="col-sm-1 control-label" for="input-id-4">权限管理</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerPower" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
                <label class="col-sm-1 control-label" for="input-id-3">客户供应商</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerCustomer" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
            </div>
                <div class="line line-dashed b-b line-lg pull-in"></div><div class="form-group">
                <label class="col-sm-1 control-label" for="input-id-1">枚举信息</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerSelect" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
                <label class="col-sm-1 control-label" for="input-id-4">仓库管理</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerWarehouse" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
                <label class="col-sm-1 control-label" for="input-id-3">货品类别</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerGoodsType" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
            </div>
                <div class="line line-dashed b-b line-lg pull-in"></div><div class="form-group">
                <label class="col-sm-1 control-label" for="input-id-1">货品信息</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerGoods" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
                <label class="col-sm-1 control-label" for="input-id-4">期初录入</label>
                <div class="col-sm-3">
                    <label class="i-switch m-t-xs m-r">
                        <input ng-model="row.powerInitialEntry" type="checkbox" ng-true-value="true" ng-false-value="false">
                        <i></i>
                    </label>
                </div>
            </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
                    <div class="col-sm-11">
                        <textarea ng-model="row.powerBz" type="text" class="form-control" id="powerBz" value="{{row.powerBz}}">{{row.powerBz}}</textarea>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </form>
        </div>
    </div>
</div>
<script type="text/ng-template" id="myModalContent.html">
    <div ng-include="'tpl/modal.html'"></div>
</script>

<script type="text/ng-template" id="selectUser.html">
    <div ng-include="'tpl/selectUser.html'"></div>
</script>